<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Migration_CreateTable_CommodityFavorite extends CI_Migration
{
    public function up()
    {
        $this->dbforge->add_field('id');
        $this->dbforge->add_field(array(
            'commodity_id' => array('type' => 'INT', 'constraint' => '9',),
            'user_id'      => array('type' => 'INT', 'constraint' => '9',),
        ));
        $this->dbforge->create_table('commodity_favorite');
    }

    public function down()
    {
        $this->dbforge->drop_table('commodity_favorite');
    }
} 